package com.ssy.lingxi.report.model.vo.convert;

import com.ssy.lingxi.common.utils.DateUtil;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 平台积分结算明细CVO（转DO用，针对不同服务字段调整后，造成字段类型不一致问题）
 * @author 伍将
 * @date 2020/10/29
 * @version 2.0.0
 */
public class PlatformScoreSettlementDetailCVO implements Serializable {

    private static final long serialVersionUID = -2970503189347315741L;
    /**
     * ID
     */
    private Long id;

    /**
     * 结算id
     */
    private Long settlementId;

    /**
     * 会员id
     */
    private Long memberId;

    /**
     * 角色id
     */
    private Long roleId;

    /**
     * 单据号
     */
    private String orderNo;

    /**
     * 单据摘要
     */
    private String orderAbstract;

    /**
     * 单据类型:1.生成通知单 2.物流单 3.订单 4.积分订单 5.退货申请单
     */
    private Integer settlementOrderType;

    /**
     * 单据时间
     */
    private Long orderTime;

    /**
     * 单据时间（对应db）
     */
    private LocalDateTime orderTimeTemp;

    /**
     * 订单类型
     */
    private Integer orderType;

    /**
     * 单据积分
     */
    private Double orderScore;

    /**
     * 支付积分
     */
    private Double payScore;

    /**
     * 支付时间
     */
    private Long payTime;

    /**
     * 支付时间（对应db）
     */
    private LocalDateTime payTimeTemp;

    /**
     * 兑换比例(百分比乘以100之后存储)
     */
    private Double ratio;

    /**
     * 结算金额
     */
    private Double settlementAmount;

    /**
     * 管理数据id
     */
    private Long dataId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSettlementId() {
        return settlementId;
    }

    public void setSettlementId(Long settlementId) {
        this.settlementId = settlementId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderAbstract() {
        return orderAbstract;
    }

    public void setOrderAbstract(String orderAbstract) {
        this.orderAbstract = orderAbstract;
    }

    public Integer getSettlementOrderType() {
        return settlementOrderType;
    }

    public void setSettlementOrderType(Integer settlementOrderType) {
        this.settlementOrderType = settlementOrderType;
    }

    public Long getOrderTime() {
        if(orderTime==null&&orderTimeTemp!=null){
            orderTime= DateUtil.convertToTimeMillis(orderTimeTemp);
        }
        return orderTime;
    }

    public void setOrderTime(Long orderTime) {
        this.orderTime = orderTime;
    }

    public LocalDateTime getOrderTimeTemp() {
        return orderTimeTemp;
    }

    public void setOrderTimeTemp(LocalDateTime orderTimeTemp) {
        this.orderTimeTemp = orderTimeTemp;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Double getOrderScore() {
        return orderScore;
    }

    public void setOrderScore(Double orderScore) {
        this.orderScore = orderScore;
    }

    public Double getPayScore() {
        return payScore;
    }

    public void setPayScore(Double payScore) {
        this.payScore = payScore;
    }

    public Long getPayTime() {
        if(payTime==null&&payTimeTemp!=null){
            payTime= DateUtil.convertToTimeMillis(payTimeTemp);
        }
        return payTime;
    }

    public void setPayTime(Long payTime) {
        this.payTime = payTime;
    }

    public LocalDateTime getPayTimeTemp() {
        return payTimeTemp;
    }

    public void setPayTimeTemp(LocalDateTime payTimeTemp) {
        this.payTimeTemp = payTimeTemp;
    }

    public Double getRatio() {
        return ratio;
    }

    public void setRatio(Double ratio) {
        this.ratio = ratio;
    }

    public Double getSettlementAmount() {
        return settlementAmount;
    }

    public void setSettlementAmount(Double settlementAmount) {
        this.settlementAmount = settlementAmount;
    }

    public Long getDataId() {
        return dataId;
    }

    public void setDataId(Long dataId) {
        this.dataId = dataId;
    }
}
